import java.util.*;
import java.io.*;

public class 拓扑排序牛客模板 {
    //https://www.nowcoder.com/practice/88f7e156ca7d43a1a535f619cd3f495c
    //和课程表一样, 数据量太大多加一个模板即可
    public static PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
    public static Read in = new Read();
    public static void main(String[] args) throws IOException{
        int n = in.nextInt();
        int m = in.nextInt();
        List<List<Integer>> graph = new ArrayList<>();
        int[] indegree = new int[n + 1];
        for(int i = 0;i <= n;i++){
            graph.add(new ArrayList<>());
        }
        for(int i = 0;i < m;i++){
            int a = in.nextInt();
            int b = in.nextInt();
            graph.get(a).add(b);
            indegree[b]++;
        }
        int l = 0;
        int r = 0;
        int[] queue = new int[n];
        for(int i = 1;i <= n;i++){
            if(indegree[i] == 0){
                queue[r++] = i;
            }
        }
        int cnt = 0;
        while(l < r){
            int cur = queue[l++];
            cnt++;
            for(int num : graph.get(cur)){
                if(--indegree[num] == 0){
                    queue[r++] = num;
                }
            }
        }
        if(cnt == n){
            for(int i = 0;i < n;i++){
                if(i == n - 1){
                    out.print(queue[i]);
                }else{
                    out.print(queue[i] + " ");
                }

            }
        }else{
            System.out.print("-1");

        }
        out.close();
    }
}
class Read // 自定义快速读入
{
    StringTokenizer st = new StringTokenizer("");
    BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
    String next() throws IOException
    {
        while(!st.hasMoreTokens())
        {
            st = new StringTokenizer(bf.readLine());
        }
        return st.nextToken();
    }

    String nextLine() throws IOException
    {
        return bf.readLine();
    }

    int nextInt() throws IOException
    {
        return Integer.parseInt(next());
    }

    long nextLong() throws IOException
    {
        return Long.parseLong(next());
    }

    double nextDouble() throws IOException
    {
        return Double.parseDouble(next());
    }
}
